Carbon


DMNewDisplay

Header: Displays.h Carbon status: Supported

Adds a video device to the device list and makes the device active.

OSErr DMNewDisplay (
    GDHandle *newDevice, 
    SInt16 driverRefNum, 
    UInt32 mode, 
    UInt32 reserved, 
    DisplayIDType displayID, 
    Component displayComponent, 
    Handle displayState
);
Parameter descriptions
newDevice

A pointer to a handle to a GDevice structure for the video device that you want to add to the device list.

driverRefNum

The reference number of the video device which you are adding to the device list. This information is usually set at system startup. The function DMAddDisplay passes the value supplied here to the InitGDevice function in its gdRefNum parameter.

mode

The depth mode. Used by the video device driver, this value sets the pixel depth and specifies color. The function DMAddDisplay passes the value supplied here to the function InitGDevice in its mode parameter.

reserved

Reserved for future expansion. Pass NULL in this parameter.

displayID

A unique identification for the display. For new displays, supply this parameter with the value 0, which causes the Display Manager to generate a unique display ID for this device. If this display was removed, then pass the display ID of the current display in this parameter.

displayComponent

Reserved for future expansion. Pass NULL in this parameter.

displayState

If your application called DMBeginConfigureDisplays, you must pass the displayState handle obtained. Otherwise pass NULL in this parameter.

function result

A result code.

SPECIAL CONSIDERATIONS

Because this function may move or purge memory blocks or access handles, you cannot call it at interrupt time.

Generally, your application should not use this function, but should instead allow system software to maintain the device list. This function is described here for completeness only.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)